

//使用路由前，导入路由插件
import {createRouter,createWebHistory} from 'vue-router'
// const routerHistory = createRouter()
import Maid from '../components/Maid'
import App from '../App'
import SHOP from '../../src/pages/SHOP/SHOP.vue'
import Video from '../components/video'
import Forum from '../components/forum.vue'
import Login from '../components/login'
import Enroll from '@/components/enroll'
import Setup from '@/components/Set_up'
import Activity from '@/components/activity'
import Activities from "@/components/activities";
import ActivityOver from '@/components/activityOver';
import ShopDetailed from '@/components/ShopDetailed';
import ShoppingCar from '@/components/ShoppingCar'
// import LuntanMaid from "@/components/LuntanMaid";
// import Luntanpublish from "@/components/Luntanpublish";
// import Luntanreplies from "@/components/Luntanreplies";

const routerHistory = createWebHistory()
//创建路由实验对象
const router = createRouter({
    history:routerHistory,
    routes:[
        {path:'/',redirect:'/login'},
        {path:'/shopping',component:SHOP,meta:{title:'次元口袋'}},
        {path:'/forum',component:Forum,meta:{title:'次元小窝'}},
        {path:'/app',component:App,meta:{title:'次元窝'}},
        {path:'/maid',component:Maid,meta:{title:'首页'}},
        {path:'/video',component:Video,meta:{title:'次元看点'}},
        {path:'/Login',component:Login,meta:{title: '窝登录'}},
        {path:'/enroll',component:Enroll,meta:{title: '窝注册'}},
        {path:'/setup',component:Setup,meta:{title: '设置'},},
        {path:'/shoppingCar',component:ShoppingCar,meta:{title: '购物车'},},
        {path:'/shopDetailed/:id',component:ShopDetailed,meta:{title: '商品详情'},},
        {path:'/activity',component:Activity,meta:{title: '活动'},
            children:[
                {
                    path:'/activities',component:Activities,meta:{title: '正在进行中'}
                },
                {
                    path:'/activityOver',component:ActivityOver,meta:{title: '活动已结束'}
                },
            ]},
        // {path:'/luntanmaid',component:LuntanMaid,meta:{title: '次元小窝'}},
        // {path:'/luntanpublish',component:Luntanpublish,meta:{title: '写帖子'}},
        // {path:'/luntanreplies',component:Luntanreplies,meta:{title: '论坛管理信息系统'}},
    ],
    mode:'history',
})
//向外共享路由的实验对象
export default router
